package com.aaa.a1109.demo05;

import java.util.ArrayList;

/**
 * @author 荆豪峰
 * @version 1.0
 */
public class AAAPublic implements IPublilc {
    private String msg;
    private ArrayList<UserInterface> list = new ArrayList<UserInterface>();

    public void guanzhu(UserInterface userInterface) {
        list.add(userInterface);
    }

    public void quxiaokeu(UserInterface userInterface) {
        list.remove(userInterface);
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public void qunfa() {
        for (UserInterface userInterface : list) {
            userInterface.getMsg(msg);
        }
    }
}
